﻿using System.Collections.Generic;

using VSTalk.Engine.Core.Event.Events;

namespace VSTalk.Engine.Core.Event.Transactions
{
    public class ClientRemovingTran : ITransactionUnit<ClientRemovingEvent>
    {
        public IList<object> Transact(ClientRemovingEvent unit)
        {
            return new List<object>()
            {
                Convert(unit)
            };
        }

        private DisconnectClientEvent Convert(ClientRemovingEvent e)
        {
            return new DisconnectClientEvent
            {
                ClientId = e.ClientId
            };
        }
    }
}